|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectraar.gui.RAGProcess
public class RAGProcess
This class can draw a neat image of a process. Provide a graphics object of a bufferedimage on which the process has to be drawn.
You can create Buffered Image graphics with code like this (supposed you have a normal image called
image):
BufferedImage buffer = new BufferedImage(image.getWidth(null), image.getHeight(null), BufferedImage.TYPE_3BYTE_BGR);
Graphics g = buffer.getGraphics();
g.drawImage(image,0,0,null);
| Field Summary | |
|---|---|
static float |
alpha
Determines the opacity of processes ranging from 0 (transparent) to 1 (opaque). |
static java.awt.Color |
backgroundColor
Determines the colour processes will be filled with. |
static java.awt.Color |
backgroundColorActor
Determines the colour actors will be filled with. |
static java.awt.Color |
backgroundColorFactory
Determines the colour factories will be filled with. |
static java.awt.Color |
backgroundColorMonitor
Determines the colour monitors will be filled with. |
static java.awt.Color |
backgroundColorSelected
Determines the colour the selected process will be filled with. |
static java.awt.Color |
backgroundColorSensor
Determines the colour sensors will be filled with. |
static java.awt.Color |
backgroundColorSpecial
Determines the colour special processes will be filled with. |
static java.awt.Color |
foregroundColor
Determines the colour the process lines and text will be drawn in. |
static java.awt.Font |
ins
Font for inputs and outputs. |
static java.awt.Font |
prn
Font for process name. |
| Constructor Summary | |
|---|---|
RAGProcess(RAProcess source)
Construct the drawer with specified process. |
|
| Method Summary | |
|---|---|
int |
getHeight()
How high will the box of this process be? |
java.awt.Shape[] |
getInputShapes()
Get the shapes that form the inputs of the process. |
java.awt.Shape[] |
getOutputShapes()
Get the shapes that form the outputs of the process. |
RAProcess |
getProcess()
Return the process we are drawing. |
java.awt.Image |
getSelected()
Return the selected process image. |
java.awt.Image |
getUnselected()
Return the unselected process image. |
void |
redraw()
Redraw the process image (for example when something has changed in the process). |
void |
setProcess(RAProcess p)
Set the process we are drawing. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.awt.Font ins
public static final java.awt.Font prn
public static java.awt.Color foregroundColor
public static java.awt.Color backgroundColor
public static java.awt.Color backgroundColorSpecial
public static java.awt.Color backgroundColorMonitor
public static java.awt.Color backgroundColorActor
public static java.awt.Color backgroundColorFactory
public static java.awt.Color backgroundColorSensor
public static java.awt.Color backgroundColorSelected
public static float alpha
| Constructor Detail |
|---|
public RAGProcess(RAProcess source)
| Method Detail |
|---|
public RAProcess getProcess()
public void setProcess(RAProcess p)
public void redraw()
public java.awt.Image getUnselected()
public java.awt.Image getSelected()
public int getHeight()
public java.awt.Shape[] getInputShapes()
public java.awt.Shape[] getOutputShapes()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||